"""
    celery配置文件
"""
import os
from django.conf import settings
from celery import Celery

# 1.为celery设置环境变量
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djcelery.settings")

# 2.初始化celery应用
app = Celery("dashopt", broker="redis://:@127.0.0.1:6379/2")

# 3.设置自动发现异步任务
app.autodiscover_tasks(settings.INSTALLED_APPS)










